<template>
  <h1>开关组件</h1>
  <el-switch v-model="value1" />
  <el-switch
      v-model="value2"
      class="ml-2"
      style="--el-switch-on-color: #13ce66; --el-switch-off-color: #ff4949"
  />
  <el-switch
      v-model="isAdmin"
      class="ml-2"
      style="--el-switch-on-color: #13ce66;"
  />
  <hr>
  是否显示图片<el-switch v-model="isShow"></el-switch>
  <hr>
  <img src="fcq.jpg" v-if="isShow" width="200">
  <hr>
  <el-switch v-model="num" :active-value="1" :inactive-value="0"></el-switch>
</template>

<script setup>
import { ref } from 'vue'

const value1 = ref(false);
const value2 = ref(true);
const isAdmin = ref(false);
const isShow = ref(false);
const num = ref(1);

</script>


<style scoped>

</style>